package com.fw.service.persistence.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.fw.service.persistence.dto.BOUser;

public interface BOUserDAO extends JpaRepository<BOUser, Long>, JpaSpecificationExecutor<BOUser> {

    // @Query("select t from BOUser t where t.username = :username and t.status = :status")
    // public List<BOUser> selectByUsernameAndStatus(@Param("username") String username, @Param("status") String status);
    //
    // @Query("select t from BOUser t where t.status = :status")
    // public List<BOUser> selectByStatus(@Param("status") String status);

    @Query("select distinct t.createBy from BOUser t order by t.createBy")
    public List<Object> selectDistinctCreateBy();

    @Query("select distinct t.lastUpdateBy from BOUser t order by t.lastUpdateBy")
    public List<Object> selectDistinctLastUpdateBy();

}
